<template>
    <div class="container">
        <img :src="this.image" alt="">
    </div>
</template>
<script>
import {bargainPoster} from '@/api/bargain'
export default {
    data() {
        return {
            image: '',
            bargainId: ''
        }
    },
    methods: {
        reciveBagainId() {
            this.bargainId = this.$route.query.bargainId
            this.getPoster()
        },
        getPoster(){
            
            const data = {
                bargainId: this.bargainId,
                from: "666"
            }
            bargainPoster(data).then(res => {
                if (res.status === 200) {
                    this.image = res.data.url.replace('127.0.0.1','192.168.200.221')
                } else {
                    this.$toast('加载失败 请刷新页面或稍后重试')
                }
            })
        }

    },
    created() {
        this.reciveBagainId()
    }
}
</script>
<style lang="scss">
*{
    margin: 0;
    padding: 0;
}
.container{
    width: 100%;
    height: 100%;
    background: #fff;
    img{
        width: 100%;
        height: 100%;
    }
}
</style>